
<html>

<head>
    <meta charset="UTF-8">
    <title>表模型目录</title>
    <link href="../../static/easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css" />
    <link href="../../static/easyui/themes/icon.css" rel="stylesheet" type="text/css" />
    <script src="../../static/easyui/jquery.min.js" type="text/javascript"></script>
    <script src="../../static/easyui/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../static/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
    <script src="../../static/plugin/assets/jslib.util.js" type="text/javascript"></script>
    <script src="../../static/plugin/assets/jslib.jquery.ajax.js" type="text/javascript"></script>
    <script src="../../static/plugin/assets/jslib.easyui.util.js" type="text/javascript"></script>
    <script src="../../ffres/dict/all.js"></script>
    <a href="" target="_blank" id="commonLink" name="commonLink"></a>
</head>

<body class="easyui-layout">
    <div class="easyui-layout" title="" style="width:100%;height:100%;padding:0px;">
        <div data-options="region:'center',split:false" title="" style="width:25%;">
            <ul id="nav" class="easyui-tree" data-options="animate:true,
					lines:true,method:'get',
					animate:true" id="menu_app1">
        </div>
        <div data-options="region:'south',split:false" style="height:30px;text-align:center;padding:0px">
            <a href="javascript:void(0)" class="easyui-linkbutton" onclick="doSelect()">选择返回</a>&nbsp;
            <a href="javascript:void(0)" class="easyui-linkbutton" onclick="closeForm()">&nbsp;关&nbsp;闭&nbsp;</a>
        </div>
    </div>

    <script>

        var callback = $.getUrlParam('callback');

		var selection = null;
        $(function() {
            
            $('#nav').tree({
                url:'../../api/project/tree/package/' + $.getUrlParam('projectId'),
                onClick: function(node) {
                    selection = node;
                },
                
            })
        });

        function doSelect() {
            if (selection) {
                if (callback && window.parent[callback]) {
                    window.parent[callback].call(window.parent, selection)
                }
                window.parent.JLEUtil.closewin();
            } else {
                $.messager.alert('提示', '请选择一条记录！');
            }
        }

        function closeForm() {
            window.parent.JLEUtil.closewin();
        }
    </script>
</body>

</html>